const { checkToken } = require('common-uni-id');
// 根据token获取用户信息
async function getUserInfo(token) {
	let payload = await checkToken(token)
	if (payload.code) {
		return payload
	}
	userInfo=payload.userInfo
	/* 
	let res = await uniID.getUserInfo({
		uid: payload.uid,
		field: ['app_id', 'shop_id', 'openid', 'role', 'username', 'mobile', 'full_id', 'full_name','session_key','space_id','alipay_isvpid']
	})
	let userInfo = res.userInfo */
	return userInfo
}
module.exports = {
	getUserInfo
}
